<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body class="box">
	姓名:<input type="text" value=""><br>
	密码:<input type="text" value=""><br>
	邮箱:<input type="text" value=""><br>
	<button>提交</button>
</body>
<script src="../jquery-3.3.1.min.js"></script>
<script>
	// var inp = document.querySelectorAll("input");
	// var btn = document.querySelector("button");
	// // console.log(inp)

	// btn.onclick = function(){
	// 	inp[0].value = "张三";
	// 	inp[1].value = "23415";
	// 	inp[2].value = "san@qq.com";
	// }

	var inp = $("input");
	var btn = $("button");

	btn.click(function() {

		$(inp[0]).attr("value","张三");

		$(inp[1]).attr("value","23415");

		$(inp[2]).attr("value","san@qq.com");


	})

</script>
</html>